package com.megalith.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.megalith.mapper.StudentMapper;
import com.megalith.domain.Student;
import com.megalith.service.StudentService;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Service
public class StudentServiceImpl implements StudentService{

    public List<Student> getMockData() {
        ArrayList<Student> students = new ArrayList<Student>();

        for (int i = 0; i < 10; i++) {
            Student student = new Student();
            student.setId("20140102100"+i)
                    .setName("测试学生"+i)
                    .setAddress("甘肃省漳县四族乡周家门村"+i+1+"号")
                    .setClassId("10"+i)
                    .setSex(String.valueOf(i%2==0?0:1));
            students.add(student);
        }
        return students;
    }

}
